home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / center < prev    next >
Text File  |  2001-03-21  |  756b  |  25 lines

  1. Synopsis:
  2.    $center(<width> <text>)
  3.  
  4. Technical:
  5.    This function returns the input text right-justified in a buffer that is
  6.    precisely ( ((width - strlen(text)) / 2) + strlen(text) ) characters
  7.    wide.  The width must be given, there is no default.
  8.  
  9. Practical:
  10.    This function returns the given text, padded on the left such that it
  11.    will appear to be "centered" in the width given.  The right side is not
  12.    padded, only the left.  To force padding on both sides, you must use the
  13.    width qualifier $[]var.
  14.  
  15. Returns:
  16.    input text centered in given width
  17.  
  18. Examples:
  19.    $center(15 hello there)               returns "  hello there"
  20.    $[15]center(15 hello there)           returns "  hello there  "
  21.  
  22. See Also:
  23.    Special_Vars(7)
  24.  
  25.